| API Documentation |  |

- MAIN PAGE
- NAMESPACES
- CLASSES

MeshInputLayoutAttribute.h
1 // MeshInputLayoutAttribute.h
3 //
5
6 namespace nkGraphics
7 {
11 struct MeshInputLayoutAttribute final
12 {
13 // Attributes
14 nkMemory::String _semanticName ;
15 unsigned int _bufferSlot = 0u ;
16 unsigned int _byteOffset = -1 ;
17
18 unsigned int _instanceStepRate = 1u ;
19
20 unsigned int _arraySize = 1u ;
21
22 FORMAT _format = R32G32B32A32_FLOAT ;
23 ATTRIBUTE_GRANULARITY _granularity = ATTRIBUTE_GRANULARITY::PER_VERTEX ;
24
25 // Functions
26 // Constructors
30 MeshInputLayoutAttribute () noexcept = default ;
31
37 MeshInputLayoutAttribute (nkMemory::StringView semanticName) noexcept ;
38
45 MeshInputLayoutAttribute (nkMemory::StringView semanticName, FORMAT format) noexcept ;
46 } ;
47 }
nkGraphics::MeshInputLayoutAttribute
Describes an attribute in a mesh layout.
Definition: MeshInputLayoutAttribute.h:12
nkGraphics::MeshInputLayoutAttribute::_arraySize
unsigned int _arraySize
Number of nkFloat4 the attribute covers. A size of 1 corresponds to a nkFloat4, while 4 uses 4 of the...
Definition: MeshInputLayoutAttribute.h:20
nkGraphics::ATTRIBUTE_GRANULARITY
ATTRIBUTE_GRANULARITY
Enumerates all granularity available when feeding attribute data.
Definition: AttributeGranularity.h:12
nkGraphics::ATTRIBUTE_GRANULARITY::PER_VERTEX
@ PER_VERTEX
Data is fed per vertex drawn in one instance.
nkGraphics::MeshInputLayoutAttribute::_granularity
ATTRIBUTE_GRANULARITY _granularity
Data granularity.
Definition: MeshInputLayoutAttribute.h:23
nkGraphics::MeshInputLayoutAttribute::_bufferSlot
unsigned int _bufferSlot
The buffer slot the attribute is to be found. This corresponds to the index of the vertex buffer link...
Definition: MeshInputLayoutAttribute.h:15
nkGraphics::MeshInputLayoutAttribute::_byteOffset
unsigned int _byteOffset
The offset required in the buffer before finding the first element for this attribute....
Definition: MeshInputLayoutAttribute.h:16
nkMemory::String
Class holding information about a string, with ownership over the data.
Definition: String.h:22
nkGraphics::MeshInputLayoutAttribute::_semanticName
nkMemory::String _semanticName
The semantic name to attach to the attribute. Used to link to the shader program code.
Definition: MeshInputLayoutAttribute.h:14
nkGraphics::MeshInputLayoutAttribute::_instanceStepRate
unsigned int _instanceStepRate
Instance step rate. If _granularity is ATTRIBUTE_GRNULARITY::PER_INSTANCE, then gives the number of i...
Definition: MeshInputLayoutAttribute.h:18
nkGraphics::MeshInputLayoutAttribute::_format
FORMAT _format
Data format.
Definition: MeshInputLayoutAttribute.h:22
nkGraphics::FORMAT
FORMAT
Available formats for resources.
Definition: DxDefinesWrapper.h:13
nkGraphics
Encompasses all API of component NilkinsGraphics.
Definition: BoundingBox.h:7
nkGraphics::MeshInputLayoutAttribute::MeshInputLayoutAttribute
MeshInputLayoutAttribute() noexcept=default
nkMemory
Encompasses all API of component NilkinsMemory.
Definition: Allocator.h:7